.class public Les/ef0;
.super Landroid/os/AsyncTask;
.source "FileReader.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Ljava/lang/StringBuilder;",
        ">;"
    }
.end annotation


# instance fields
.field private final a:Lcom/jecelyin/editor/v2/common/b;

.field private b:Ljava/lang/StringBuilder;

.field private c:Ljava/io/File;

.field private d:Ljava/lang/String;

.field private e:I

.field private f:Ljava/lang/Throwable;


# direct methods
.method public constructor <init>(Ljava/io/File;Ljava/lang/String;ZLcom/jecelyin/editor/v2/common/b;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    const/4 p3, 0x0

    .line 2
    iput-object p3, p0, Les/ef0;->b:Ljava/lang/StringBuilder;

    .line 3
    iput-object p1, p0, Les/ef0;->c:Ljava/io/File;

    .line 4
    iput-object p2, p0, Les/ef0;->d:Ljava/lang/String;

    .line 5
    iput-object p4, p0, Les/ef0;->a:Lcom/jecelyin/editor/v2/common/b;

    return-void
.end method

.method private b()Ljava/lang/StringBuilder;
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;,
            Ljava/lang/OutOfMemoryError;
        }
    .end annotation

    const/4 v0, 0x0

    .line 1
    iput v0, p0, Les/ef0;->e:I

    .line 2
    iget-object v1, p0, Les/ef0;->d:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 3
    iget-object v1, p0, Les/ef0;->c:Ljava/io/File;

    invoke-static {v1}, Les/df0;->a(Ljava/io/File;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Les/ef0;->d:Ljava/lang/String;

    .line 4
    :cond_0
    new-instance v1, Les/gf0;

    new-instance v2, Ljava/io/InputStreamReader;

    new-instance v3, Ljava/io/FileInputStream;

    iget-object v4, p0, Les/ef0;->c:Ljava/io/File;

    invoke-direct {v3, v4}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    iget-object v4, p0, Les/ef0;->d:Ljava/lang/String;

    invoke-direct {v2, v3, v4}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/lang/String;)V

    invoke-direct {v1, v2}, Les/gf0;-><init>(Ljava/io/Reader;)V

    const/16 v2, 0x4000

    new-array v3, v2, [C

    .line 5
    new-instance v4, Ljava/lang/StringBuilder;

    const/high16 v5, 0x10000

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(I)V

    iput-object v4, p0, Les/ef0;->b:Ljava/lang/StringBuilder;

    .line 6
    :goto_0
    invoke-virtual {v1, v3, v0, v2}, Les/gf0;->read([CII)I

    move-result v4

    const/4 v5, -0x1

    if-eq v4, v5, :cond_1

    .line 7
    iget-object v5, p0, Les/ef0;->b:Ljava/lang/StringBuilder;

    invoke-virtual {v5, v3, v0, v4}, Ljava/lang/StringBuilder;->append([CII)Ljava/lang/StringBuilder;

    goto :goto_0

    .line 8
    :cond_1
    invoke-virtual {v1}, Les/gf0;->d()I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Les/ef0;->e:I

    .line 9
    invoke-virtual {v1}, Les/cf0;->close()V

    .line 10
    iget-object v0, p0, Les/ef0;->b:Ljava/lang/StringBuilder;

    return-object v0
.end method


# virtual methods
.method protected varargs a([Ljava/lang/Void;)Ljava/lang/StringBuilder;
    .locals 0

    .line 2
    :try_start_0
    invoke-direct {p0}, Les/ef0;->b()Ljava/lang/StringBuilder;

    move-result-object p1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return-object p1

    :catchall_0
    move-exception p1

    .line 3
    iput-object p1, p0, Les/ef0;->f:Ljava/lang/Throwable;

    const/4 p1, 0x0

    return-object p1
.end method

.method public a()V
    .locals 2

    .line 1
    sget-object v0, Landroid/os/AsyncTask;->THREAD_POOL_EXECUTOR:Ljava/util/concurrent/Executor;

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Void;

    invoke-virtual {p0, v0, v1}, Landroid/os/AsyncTask;->executeOnExecutor(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Landroid/os/AsyncTask;

    return-void
.end method

.method protected a(Ljava/lang/StringBuilder;)V
    .locals 4

    .line 4
    iget-object v0, p0, Les/ef0;->a:Lcom/jecelyin/editor/v2/common/b;

    iget-object v1, p0, Les/ef0;->d:Ljava/lang/String;

    iget-object v2, p0, Les/ef0;->f:Ljava/lang/Throwable;

    iget v3, p0, Les/ef0;->e:I

    invoke-interface {v0, p1, v1, v2, v3}, Lcom/jecelyin/editor/v2/common/b;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/Throwable;I)V

    return-void
.end method

.method protected bridge synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 0

    .line 1
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Les/ef0;->a([Ljava/lang/Void;)Ljava/lang/StringBuilder;

    move-result-object p1

    return-object p1
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0

    .line 1
    check-cast p1, Ljava/lang/StringBuilder;

    invoke-virtual {p0, p1}, Les/ef0;->a(Ljava/lang/StringBuilder;)V

    return-void
.end method

.method protected onPreExecute()V
    .locals 1

    .line 1
    iget-object v0, p0, Les/ef0;->a:Lcom/jecelyin/editor/v2/common/b;

    invoke-interface {v0}, Lcom/jecelyin/editor/v2/common/b;->onStart()V

    return-void
.end method
